import request from '@/utils/request'

export const login = data => {
  return request({
    url: '/v1_0/authorizations',
    method: 'post',
    data
  })
}

export const userInfo = () => {
  return request({
    url: '/v1_0/user/profile'
    // headers: {
    //     Authorization: 'Bearer ' + store.state.tokenObj.token
    // }
  })
}

export const editInfo = data => {
  return request({
    url: '/v1_0/user/profile',
    method: 'patch',
    data
  })
}

export const editPhoto = data => {
  return request({
    url: '/v1_0/user/photo',
    method: 'patch',
    data
  })
}
